#ifndef LIBCELL_TOOL2PCL_H_
#define LIBCELL_TOOL2PCL_H_
#include<Mesh_IO/Mesh_IO.h>
#include<pcl/io/pcd_io.h>
#include<pcl/point_types.h>
#define quote lib_cell_quote

static  void libcell2pcl_pointnormal(Mesh* m,PointCloud<PointNormal>::Ptr cloud )
{
    cloud->resize(m->num_v(m));
    int i=0;
    for(auto it=m->v_begin(m);it!=m->v_end(m);it++)
    {

        cloud->points[i].x= quote(it)->point[0];
        cloud->points[i].y= quote(it)->point[1];
        cloud->points[i].z= quote(it)->point[2];

        double*normal=(double*)(quote(it)->prop);

        cloud->points[i].normal_x=normal[0];cloud->points[i].normal_y=normal[1];cloud->points[i].normal_z=normal[2];

        i++;
    }

}


static void pcl_pointnormal2libcell(PointCloud<PointXYZ>::Ptr cloud,Mesh* m  )
{
    double p[3]={0};
    for(int i=0;i<cloud->size();i++)
    {
        p[0]=cloud->points[i].x; p[1]=cloud->points[i].y; p[2]=cloud->points[i].z;    
        template_v* v= m->create_vertexv(m,p,3);


    }
}





#endif 
